package SoftwareEngineering01.WordFrequence.readFile;


import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;

public class Article {
    public static byte[] bytes = new byte[1024];
    public static java.lang.String article(File file) throws IOException{
        StringBuffer stringBuffer = new StringBuffer();
        FileInputStream fileInputStream = new FileInputStream(file);
        int _length;
        while((_length = fileInputStream.read(bytes)) != -1){
            stringBuffer.append(new String(bytes,0,_length));
        }
        fileInputStream.close();
        String str = stringBuffer.toString();
        return str;
    }
}
